Filter

Basic and Crystal syntax.

Overloads
Arguments
Returns

Array of String values.

Action

Filter searches an array of strings for a specified string, and returns the strings in an array.

Examples

The following examples are applicable to Basic and Crystal syntax.

The examples assume that inputStrings is a String array consisting of the 5 elements: "pineapple", "Apple", "APPLE", "grape", and "orange".

Filter (inputStrings, "ap")

Returns an array containing the 2 strings "pineapple" and "grape".

Filter (inputStrings, "Ap", True)

Returns an array containing the 1 string "Apple".

Filter (inputStrings, "ap", True, 1)

Returns an array containing the 4 strings "pineapple", "Apple", "APPLE" and "grape". Matching to the search string uses case-insensitive comparison.

Filter (inputStrings, "ap", False)

Returns an array containing the 3 strings "Apple", "APPLE" and "orange".

Filter (inputStrings, "cd")

Returns an array containing 1 string, the empty string "". The returned array does not contain any matching strings but contains 1 element since the formula language does not support empty arrays.

Comments

This function is designed to work like the Visual Basic function of the same name.



Seagate Software, Inc.
http://www.seagatesoftware.com
Please send comments to:
techpubs@seagatesoftware.com